function build_and_run_test($cxx_standard) {
    Write-Output cxx_standard=$cxx_standard
    if (Test-Path "build") {
        Remove-Item -Path "build" -Recurse -Force
    }
    New-Item -Path 'build' -ItemType Directory
    cd build
    cmake ../test -DCMAKE_CXX_STANDARD="$cxx_standard"
    devenv.com cpp-charconv-test.sln /Build
    ./test_to_chars.exe
    cd ..
    Remove-Item -Path "build" -Recurse -Force
}

build_and_run_test(11)
build_and_run_test(14)
build_and_run_test(17)
build_and_run_test(20)